<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<h2>Hello World!你好 世界</h2>

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script type="javascript">
    document.ready(function () {
// 为给定 ID 的 user 创建请求
        axios.get('/hello')
            .then(function (response) {
                console.log(response);
            })
            .catch(function (error) {
                console.log(error);
            });

        axios.get('/hello', {
            params: {
                username: 12345,
                domain: 'http://www.baidu.com'
            }
        })
            .then(function (response) {
                console.log(response);
            })
            .catch(function (error) {
                console.log(error);
            });
    })
</script>
</body>
</html>
